/**
 * 培训计划查看
 */
Ext.define('PJ.view.trainingprogram.View', {
	extend: 'AM.default.DefaultWindowForm',
	requires: ['AM.default.jsonp.DefaultSubmitJsonp',
	           'AM.default.DefaultDateField',
	           'AM.default.DateTime',
	           'PJ.view.trainingprogram.ParticipantsNumList',
	           'PJ.view.trainingprogram.OldParticipantsNumList'
	           ],

	modal: true,// 开启不允许点击其他组件
	frame: true,
	notEdit: true,
	isSame: false,
    width: 1005,
    height:585,
	layout: 'form',
	overflowX: 'hidden',
    overflowY: 'scroll',
	initComponent: function(){
		var me = this;
		me.items = [{
			xtype: 'container',
			border: false,
			layout: 'column',
    		width:980,
    		defaults:{
				labelAlign: 'right',
				allowBlank: true,  //红框是否显示
				padding: '0 0 10 0',
				columnWidth: .49,
				readOnly:me.isReadOnly
			},
			items:[{
				xtype: 'container',
				border: false,
				layout: 'form',
	    		width:490,
	    		margin: '0 3 0 0',
	    		items: [{
	    			xtype: 'fieldset',
	        		layout: 'form',
	        		title: '修改前',
	        		width: 470,
	        		items: [{
	    				xtype: 'container',
	    				border: false,
	    				layout: 'column',
	    				items:[{
	    					xtype: 'container',
	    					border: false,
	    					layout: 'column',
	    					columnWidth: .99,
	    					defaults:{
	    						labelAlign: 'right',
	    						allowBlank: true,  //红框是否显示
	    						padding: '5 0 0 0',
	    						labelWidth: 90,
	    						readOnly:true,
	    						columnWidth: .99,
	    						labelSeparator: ''
	    					},
	    					items:[{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"培训班名称:",
	    	            		name:"classNameOld",
	    	            		padding: '0 0 0 0'
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划申请编号:",
	    	            		name:"applyNumOld",
	    	            		blankText:"外文名不能为空!"
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"承办部委:",
	    	            		name:"undertakeNameOld",
	    	            		blankText:"别名不能为空!"
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"合办部委:",
	    	            		name:"jointNameOld",
	    	            		blankText:"国籍不能为空!"
	    	        		}/*,{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划时间:",
	    	            		name:"planDateOld",
	    	            		maxLength: 50
	    	        		}*/,{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划开始时间:",
	    	            		name:"startPlanDateOldStr",
	    	            		maxLength: 50
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划结束时间:",
	    	            		name:"endPlanDateOldStr",
	    	            		maxLength: 50
	    	        		},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"学制（天）:",
	    	            		name:"planDayOld"
	    	            	},{
	    	            		xtype:"textareafield",
	    	            		fieldLabel:"办班目的:",
	    	            		name:"classObjectiveOld"
	    	            	},{
	    	            		xtype:"textareafield",
	    	            		fieldLabel:"培训内容:",
	    	            		name:"classValuesOld"
	    	            	},{
	    	            		xtype:"textareafield",
	    	            		fieldLabel:"调训对象:",
	    	            		name:"trainingObjectOld"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"培训地点:",
	    	            		name:"trainingAddressOld"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"联系人:",
	    	            		name:"linkManOld"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"联系电话:",
	    	            		name:"linkModeOld"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"传真:",
	    	            		name:"faxOld"
	    	            	},{
	    	            		xtype: 'oldParticipantsNumList'
	    	            	}]
	    				}]
	    			},{
	        			xtype: 'hidden',
	        			name: 'oldWordId'
	        		}]
	    		}]
			},{
				xtype: 'container',
				border: false,
				layout: 'form',
	    		width:480,
	    		margin: '0 0 0 3',
	    		items: [{
	    			xtype: 'fieldset',
	        		layout: 'form',
	        		title: '修改后',
	        		width: 470,
	        		items: [{
	    				xtype: 'container',
	    				border: false,
	    				layout: 'column',
	    				items:[{
	    					xtype: 'container',
	    					border: false,
	    					layout: 'column',
	    					columnWidth: .99,
	    					defaults:{
	    						labelAlign: 'right',
	    						allowBlank: true,  //红框是否显示
	    						padding: '5 0 0 0',
	    						labelWidth: 90,
	    						readOnly:true,
	    						columnWidth: .99,
	    						labelSeparator: ''
	    					},
	    					items:[{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"培训班名称:",
	    	            		name:"classNameNew",
	    	            		padding: '0 0 0 0'
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划申请编号:",
	    	            		name:"applyNumNew",
	    	            		blankText:"计划申请编号不能为空!"
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"承办部委:",
	    	            		name:"undertakeNameNew",
	    	            		blankText:"承办部委不能为空!"
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"合办部委:",
	    	            		name:"jointNameNew",
	    	            		blankText:"合办部委不能为空!"
	    	        		}/*,{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划时间:",
	    	            		name:"planDateNew",
	    	            		maxLength: 50
	    	        		}*/,{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划开始时间:",
	    	            		name:"startPlanDateNewStr",
	    	            		maxLength: 50
	    	        		},{
	    	        			xtype:"textfield",
	    	            		fieldLabel:"计划结束时间:",
	    	            		name:"endPlanDateNewStr",
	    	            		maxLength: 50
	    	        		},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"学制（天）:",
	    	            		name:"planDayNew"
	    	            	},{
	    	            		xtype:"textareafield",
	    	            		fieldLabel:"办班目的:",
	    	            		name:"classObjectiveNew"
	    	            	},{
	    	            		xtype:"textareafield",
	    	            		fieldLabel:"培训内容:",
	    	            		name:"classValuesNew"
	    	            	},{
	    	            		xtype:"textareafield",
	    	            		fieldLabel:"调训对象:",
	    	            		name:"trainingObjectNew"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"培训地点:",
	    	            		name:"trainingAddressNew"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"联系人:",
	    	            		name:"linkManNew"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"联系电话:",
	    	            		name:"linkModeNew"
	    	            	},{
	    	            		xtype:"textfield",
	    	            		fieldLabel:"传真:",
	    	            		name:"faxNew"
	    	            	},{
	    	            		xtype: 'participantsNumList',
	    	            		isView: true
	    	            	}]
	    				}]
	    			}]
	    		}]
			}]
		}];
		this.buttons = [{
			text: '关闭',
			scope: this,
			handler: this.close
		}];
		this.callParent(arguments);
	}
});